<?php
/**
 * Created by PhpStorm.
 * User: ahao
 * Email: 827316006@qq.com
 * Date: 2019/12/4 10:29
 */

go(function () {
    $server = new Co\Http\Server('0.0.0.0',8812);
    $server->handle('/',function ($request, $response) {
        if ($request->server['request_uri'] == '/favicon.ico') {
            $request->end('not data');
            return ;
        }
        echo "abc" . PHP_EOL;
        $response->end("<h1>ahao swoole</h1>");
    });
    $server->start();
});